<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html lang="en">
<head>
<meta charset="utf-8" />
<title>大咖讲后台管理系统</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- 必须的css -->
<link href="<%=basePath %>bigshot/css/bootstrap.min.css" rel="stylesheet" />
<link href="<%=basePath %>bigshot/css/bootstrap-responsive.min.css" rel="stylesheet" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/font-awesome.min.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/lxlin.css" />
<!--[if IE 7]>
<link rel="stylesheet" href="/Public/Admin/css/font-awesome-ie7.min.css" />
<![endif]-->
<link rel="stylesheet" href="<%=basePath %>bigshot/css/ace-fonts.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/jquery-ui-1.10.3.full.min.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/ace.min.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/ace-responsive.min.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/ace-skins.min.css" />
<!--[if lte IE 8]>
	<link rel="stylesheet" href="/Public/Admin/css/ace-ie.min.css" />
<![endif]-->
<link rel="stylesheet" href="<%=basePath %>bigshot/css/bootstrap-timepicker.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/datepicker.css" />

<!-- lagou.alert -->
<link rel="stylesheet" href="<%=basePath %>bigshot/css/lagou.admin.css" />
<link rel="stylesheet" href="<%=basePath %>bigshot/css/lagou.global.css" />

<!-- webuploader -->
<link rel="stylesheet" type="text/css" href="<%=basePath %>bigshot/css/webuploader.css">

<!-- /必须的css -->
<script src="<%=basePath %>bigshot/js/channel/channel.js"></script>
<script src="<%=basePath %>bigshot/js/ace-extra.min.js"></script>
<script src='<%=basePath %>bigshot/js/jquery-1.10.2.min.js'></script>
<!-- 城市联动 -->
<script src="<%=basePath %>bigshot/js/jquery.provincesCity.js" type="text/javascript"></script>
<script src="<%=basePath %>bigshot/js/provincesdata.js" type="text/javascript"></script>
<!-- 城市联动 -->
<script src="<%=basePath %>bigshot/js/channel/channel_create.js"></script>
<script src='<%=basePath %>bigshot/js/jquery-form.js'></script>
</head>
<body>
<!-- 头部 -->
	<div class="navbar" id="navbar">
	<div class="navbar-inner">
		<div class="container-fluid">
			<a href="<%=basePath %>redirect/index.do" class="brand">
				<small class="logo">中国领先的高端商务在线语音分享社区</small>
			</a><!--/.brand-->

		<%@include file="top.jsp"%>
		</div><!--/.container-fluid-->
	</div><!--/.navbar-inner-->
</div>
<!-- /头部 -->
		<div class="main-container container-fluid">
			<a class="menu-toggler" id="menu-toggler" href="#">
				<span class="menu-text"></span>
			</a>
			<!-- 左侧菜单 -->
			
		<div class="sidebar" id="sidebar">
	<%@include file="left.jsp"%>
<div class="sidebar-collapse" id="sidebar-collapse">
	<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
</div>
<script type="text/javascript">
	try{ace.settings.check('sidebar','collapsed')}catch(e){}
</script>
</div>

			<!-- /左侧菜单 -->
			<div class="main-content">
				<!-- 面包屑导航 -->
				<div class="breadcrumbs" id="breadcrumbs">
					<ul class="breadcrumb">
						<li>
							<i class="icon-home home-icon"></i>
							<a href="<%=basePath %>redirect/index.do">首页</a>
							<span class="divider">
							<i class="icon-angle-right arrow-icon"></i>
							</span>
						</li>
						<li class="active">我的频道>编辑频道</li>

					</ul>
				</div>
				<!-- /面包屑导航 -->
				<div class="page-content">
					<div class="row-fluid">						
						<form id="channel_editform"  method="post" enctype="multipart/form-data">
							<div class="table-header" style="padding-left: 35px;">编辑频道 </div>
							<input type="hidden" name="id" id="id"/> 
							<div class="row" style="width:900px;margin-left:30px;margin-top:20px;position:relative;">
								<div class="col-xs-12">
									<div class="form-group">
										<div class="channel_editor">
											<font class="LabelTitle">上传封面：</font>
											<img src="" id="img0" >
											<input type="file" name="file0" id="file0" multiple="multiple" />
										</div>
										<script>
										$(function () {
											var cid = GetQueryString("cid");
											getChannel(cid);
										});
										
										$("#file0").change(function(){
											var objUrl = getObjectURL(this.files[0]) ;
											console.log("objUrl = "+objUrl) ;
											if (objUrl) {
												$("#img0").attr("src", objUrl) ;
											}
										}) ;
										//建立一個可存取到該file的url
										function getObjectURL(file) {
											var url = null ; 
											if (window.createObjectURL!=undefined) { // basic
												url = window.createObjectURL(file) ;
											} else if (window.URL!=undefined) { // mozilla(firefox)
												url = window.URL.createObjectURL(file) ;
											} else if (window.webkitURL!=undefined) { // webkit or chrome
												url = window.webkitURL.createObjectURL(file) ;
											}
											return url ;
										}
										</script>
										<label>
											<font class="LabelTitle" style="letter-spacing: 2.7px;" >频道ID：</font>
											<input type="text" name="cid" id="c_id" readonly="readonly" />
										</label>
										<label>
											<font class="LabelTitle">频道名称：</font>
											<input type="text" name="name" id="c_name" required="required" placeholder="请填写频道名称，最长不超过20个字符.." style="width: 400px;" value="" onblur="if(this.value.length>20){alert('您输入的长度过长，请重新输入！');value='';} "/>
										</label>
									</div>
									<div class="form-group mt10 create_channel1">
										<font class="LabelTitle">频道属性：</font>
										<label style="display: inline;margin-right: 20px;"><input name="type" id="c_type" type="radio" value="1"  style="margin-right: 5px;"/>机构</label>
										<label style="display: inline;"><input name="type" type="radio" id="c_type" value="0"  style="margin-right: 5px;"/>个人</label>
										
									</div>
									<div class="form-group mt10">
										<font class="LabelTitle">所属机构：</font>
											<input type="text" name="agency" id="c_agency" required="required" placeholder="请填写频道所属机构或个人名称.."/>
									</div>
									<div class="form-group mt10">
										<span><font class="LabelTitle">频道标签：</font>
											<select name="label" id="label">
											</select>
										</span>
									</div>
									<div class="form-group mt10 create_channel1">
										<span><font class="LabelTitle">频道状态：</font>
											<label style="display: inline;margin-right: 20px;"><input name="status" id="c_status" type="radio" value="0"  style="margin-right: 5px;"/>开放</label>
										<label style="display: inline;"><input name="status" id="status" type="radio" value="1"  style="margin-right: 5px;"/>关闭</label>
										</span>
									</div>
									<div class="form-group mt10 textareawidth">
										<div>
											<label class="LabelTitle">频道描述：<textarea id="c_description" name="description" required="required" rows="10" cols="20" style="vertical-align:top;margin-left: 4px;width: 400px;"></textarea></label>
											
										</div>
									</div>
									<div class="form-group mt10">
										<font class="LabelTitle" style="float:left;">所在城市：</font>
										<div id="test" onclick="getCity()" style="float:left;"></div>
										<input type="text" name="city" id="city" readonly="readonly"/>
									</div>
									<div class="form-group mt10">
										<font class="LabelTitle"><span style="letter-spacing: 4.5px;">联系人</span>：</font>
											<input type="text" name="contact" id="c_contact" required="required" placeholder="联系人姓名.."/>
										
									</div>
									<div class="form-group mt10">
										<font class="LabelTitle">联系电话：</font>
											<input type="text" name="phone" id="c_phone" required="required" placeholder="请输入联系人手机或者固话.."/>
									</div>
									<input type="button" style="margin-top:10px;margin-left: 30px;" onclick="AjaxEditSubmit();" class="btn btn-lg btn-success" value="提交内容" />
									<input type="reset" style="margin-top:10px;margin-left: 30px;" onclick="" class="btn btn-lg btn-reset" value="重置" />
									<input type="button" style="margin-top:10px;margin-left: 30px;" onclick="window.location.href='../redirect/channel_manage.do'" class="btn btn-lg btn-reset" value="返回" />
								</div>
							</div>
						</form>
					</div>	
				</div><!--/.page-content-->

				<!-- 右侧悬浮的设置按钮,去掉好像会引起js报错 -->
				<div class="ace-settings-container hide" id="ace-settings-container">
					<div class="btn btn-app btn-mini btn-warning ace-settings-btn" id="ace-settings-btn">
						<i class="icon-cog bigger-150"></i>
					</div>

					<div class="ace-settings-box" id="ace-settings-box">
						<div>
							<div class="pull-left">
								<select id="skin-colorpicker" class="hide">
									<option data-skin="default" value="#438EB9">#438EB9</option>
									<option data-skin="skin-1" value="#222A2D">#222A2D</option>
									<option data-skin="skin-2" value="#C6487E">#C6487E</option>
									<option data-skin="skin-3" value="#D0D0D0">#D0D0D0</option>
								</select>
							</div>
							<span>&nbsp; Choose Skin</span>
						</div>

						<div>
							<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-navbar" />
							<label class="lbl" for="ace-settings-navbar"> Fixed Navbar</label>
						</div>

						<div>
							<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-sidebar" />
							<label class="lbl" for="ace-settings-sidebar"> Fixed Sidebar</label>
						</div>

						<div>
							<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-breadcrumbs" />
							<label class="lbl" for="ace-settings-breadcrumbs"> Fixed Breadcrumbs</label>
						</div>

						<div>
							<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-rtl" />
							<label class="lbl" for="ace-settings-rtl"> Right To Left (rtl)</label>
						</div>
					</div>
				</div>
				<!-- /右侧悬浮的设置按钮,去掉好像会引起js报错 -->
			</div>
		</div>

<!-- 回到顶部 -->
<a href="###" id="btn-scroll-up" class="btn-scroll-up btn btn-small btn-inverse">
	<i class="icon-double-angle-up icon-only bigger-110"></i>
</a>
<!-- /回到顶部 -->

<!-- 操作后提示框 -->
<div id="lg-alert" class="hide" style="margin-bottom:-1.5em;"></div>

<!--modal表单弹出框-->
<form id="lg-form" class="modal fade hide form-horizontal" method="post" tabindex="-1" enctype="multipart/form-data" onSubmit="return false;"></form>

<!-- 模态框(Modal) -->
<div class="modal fade" id="Modal" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true">
	
</div><!-- /.modal -->
		
<!-- 基础js部分 -->
<script src='<%=basePath %>bigshot/js/jquery.mobile.custom.min.js'></script>
<script src="<%=basePath %>bigshot/js/jquery-ui-1.10.3.full.min.js"></script>
<script src="<%=basePath %>bigshot/js/jquery.ui.touch-punch.min.js"></script>
<script src="<%=basePath %>bigshot/js/bootstrap.min.js"></script>
<script src="<%=basePath %>bigshot/js/ace-elements.min.js"></script>
<script src="<%=basePath %>bigshot/js/ace.min.js"></script>

<script src="<%=basePath %>bigshot/js/jquery.dataTables.min.js"></script>
<script src="<%=basePath %>bigshot/js/jquery.dataTables.bootstrap.js"></script>
<script src="<%=basePath %>bigshot/js/jquery.inputlimiter.1.3.1.min.js"></script>

<!-- ueditor -->
<script type="text/javascript" src="<%=basePath %>bigshot/js/ueditor.config.js"></script>
<script type="text/javascript" src="<%=basePath %>bigshot/js/ueditor.all.js"></script>

<!-- webuploader -->
<script type="text/javascript" src="<%=basePath %>bigshot/js/webuploader.js"></script>

<!-- lagoualert -->
<script src="<%=basePath %>bigshot/js/lagou/lagou.global.js"></script>

<!-- common.lib库 -->
<script src="<%=basePath %>bigshot/js/conmon/common.lib.js"></script>

<!-- /基础js部分 -->
<script>
   $(function (){$('#myModal').modal({
      keyboard: true
   })});
</script>
<script type="text/javascript">
jQuery(function($){
	try{
		ace.settings.navbar_fixed(true);
		ace.settings.sidebar_fixed(true);
		ace.settings.breadcrumbs_fixed(true);
	}
	catch(e){}
	$('[data-rel=tooltip]').tooltip();
	$('[data-rel=popover]').popover({html:true});
});	
</script>


<script src="<%=basePath %>bigshot/js/jquery.easy-pie-chart.min.js"></script>
<script src="<%=basePath %>bigshot/js/jquery.slimscroll.min.js"></script>
<script src="<%=basePath %>bigshot/js/jquery.sparkline.min.js"></script>
<script src="<%=basePath %>bigshot/js/flot/jquery.flot.min.js"></script>
<script src="<%=basePath %>bigshot/js/flot/jquery.flot.pie.min.js"></script>
<script src="<%=basePath %>bigshot/js/flot/jquery.flot.resize.min.js"></script>
</body>
</html>